package obth;

import java.util.function.Consumer;

public class ReqRes {
    private String requestId="0001";
    private String contentType="application/json";
    private Integer contentLength= 0;
    private String dataToSend="{name: \"zhangsan\", age: 12}";
    private String url="www.baidu.com";
    private String dataToRecv="{\n" +
            "  \"name\": \"zhangsan\",\n" +
            "  \"age\": 120\n" +
            "}";

    public String getRequestId() {
        return requestId;
    }

    public void setRequestId(String requestId) {
        this.requestId = requestId;
    }

    public String getContentType() {
        return contentType;
    }

    public void setContentType(String contentType) {
        this.contentType = contentType;
    }

    public Integer getContentLength() {
        return contentLength;
    }

    public void setContentLength(Integer contentLength) {
        this.contentLength = contentLength;
    }

    public String getDataToSend() {
        return dataToSend;
    }

    public void setDataToSend(String dataToSend) {
        this.dataToSend = dataToSend;
    }

    public String getUrl() {
        return url;
    }

    public void setUrl(String url) {
        this.url = url;
    }

    public String getDataToRecv() {
        return dataToRecv;
    }

    public void setDataToRecv(String dataToRecv) {
        this.dataToRecv = dataToRecv;
    }

    public Consumer<ReqRes> getSuccess() {
        return success;
    }

    public void setSuccess(Consumer<ReqRes> success) {
        this.success = success;
    }

    private Consumer<ReqRes> success;

    @Override
    public String toString() {
        return "ReqRes{" +
                "requestId='" + requestId + '\'' +
                ", contentType='" + contentType + '\'' +
                ", contentLength=" + contentLength +
                ", dataToSend='" + dataToSend + '\'' +
                ", url='" + url + '\'' +
                ", dataToRecv='" + dataToRecv + '\'' +
                '}';
    }
}
